<template>
  <div class="setting">
    <h2 class="title">参数设置</h2>
    <div class="oper no-drag">
      <el-input v-model="saveDirectory" disabled placeholder="请选择壁纸保存目录" />
      <el-button type="primary" @click="setImageSaveDirectory">选择图片保存目录</el-button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useConfigStore } from '@renderer/store/useConfigStore'
import useWallpaper from '@renderer/hooks/useWallpaper'
import { storeToRefs } from 'pinia'

const { saveDirectory } = storeToRefs(useConfigStore())
const { setImageSaveDirectory } = useWallpaper()
</script>

<style lang="less" scoped>
.setting {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 38px);
  background: #2d404e;

  .title {
    margin-bottom: 15px;
    font-size: 16px;
    color: rgba(255, 255, 255, 1);
  }

  .oper {
    display: flex;
    margin-bottom: 40px;

    & > :nth-child(1) {
      margin-right: 8px;
    }
  }
}
</style>
